\(\int \frac {A+B x}{(a+b x) (d+e x)^3} \, dx\) [1119]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 112 \[ \int \frac {A+B x}{(a+b x) (d+e x)^3} \, dx=\frac {-B d+A e}{2 e (b d-a e) (d+e x)^2}+\frac {A b-a B}{(b d-a e)^2 (d+e x)}+\frac {b (A b-a B) \log (a+b x)}{(b d-a e)^3}-\frac {b (A b-a B) \log (d+e x)}{(b d-a e)^3} \]

[Out]

1/2*(A*e-B*d)/e/(-a*e+b*d)/(e*x+d)^2+(A*b-B*a)/(-a*e+b*d)^2/(e*x+d)+b*(A*b-B*a)*ln(b*x+a)/(-a*e+b*d)^3-b*(A*b-
B*a)*ln(e*x+d)/(-a*e+b*d)^3

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {78} \[ \int \frac {A+B x}{(a+b x) (d+e x)^3} \, dx=\frac {A b-a B}{(d+e x) (b d-a e)^2}-\frac {B d-A e}{2 e (d+e x)^2 (b d-a e)}+\frac {b (A b-a B) \log (a+b x)}{(b d-a e)^3}-\frac {b (A b-a B) \log (d+e x)}{(b d-a e)^3} \]

[In]

Int[(A + B*x)/((a + b*x)*(d + e*x)^3),x]

[Out]

-1/2*(B*d - A*e)/(e*(b*d - a*e)*(d + e*x)^2) + (A*b - a*B)/((b*d - a*e)^2*(d + e*x)) + (b*(A*b - a*B)*Log[a +
b*x])/(b*d - a*e)^3 - (b*(A*b - a*B)*Log[d + e*x])/(b*d - a*e)^3

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {b^2 (A b-a B)}{(b d-a e)^3 (a+b x)}+\frac {B d-A e}{(b d-a e) (d+e x)^3}+\frac {(-A b+a B) e}{(b d-a e)^2 (d+e x)^2}+\frac {b (A b-a B) e}{(-b d+a e)^3 (d+e x)}\right ) \, dx \\ & = -\frac {B d-A e}{2 e (b d-a e) (d+e x)^2}+\frac {A b-a B}{(b d-a e)^2 (d+e x)}+\frac {b (A b-a B) \log (a+b x)}{(b d-a e)^3}-\frac {b (A b-a B) \log (d+e x)}{(b d-a e)^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.00 \[ \int \frac {A+B x}{(a+b x) (d+e x)^3} \, dx=\frac {B d-A e}{2 e (-b d+a e) (d+e x)^2}+\frac {A b-a B}{(b d-a e)^2 (d+e x)}+\frac {b (A b-a B) \log (a+b x)}{(b d-a e)^3}-\frac {b (A b-a B) \log (d+e x)}{(b d-a e)^3} \]

[In]

Integrate[(A + B*x)/((a + b*x)*(d + e*x)^3),x]

[Out]

(B*d - A*e)/(2*e*(-(b*d) + a*e)*(d + e*x)^2) + (A*b - a*B)/((b*d - a*e)^2*(d + e*x)) + (b*(A*b - a*B)*Log[a +
b*x])/(b*d - a*e)^3 - (b*(A*b - a*B)*Log[d + e*x])/(b*d - a*e)^3

Maple [A] (verified)

Time = 0.76 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.99

method result size
default \(-\frac {\left (A b -B a \right ) b \ln \left (b x +a \right )}{\left (a e -b d \right )^{3}}-\frac {A e -B d}{2 \left (a e -b d \right ) e \left (e x +d \right )^{2}}+\frac {\left (A b -B a \right ) b \ln \left (e x +d \right )}{\left (a e -b d \right )^{3}}+\frac {A b -B a}{\left (a e -b d \right )^{2} \left (e x +d \right )}\) \(111\)
norman \(\frac {\frac {\left (A b \,e^{2}-B a \,e^{2}\right ) x}{e \left (a^{2} e^{2}-2 a b d e +b^{2} d^{2}\right )}-\frac {A a \,e^{3}-3 A b d \,e^{2}+B a d \,e^{2}+b B \,d^{2} e}{2 e^{2} \left (a^{2} e^{2}-2 a b d e +b^{2} d^{2}\right )}}{\left (e x +d \right )^{2}}+\frac {b \left (A b -B a \right ) \ln \left (e x +d \right )}{a^{3} e^{3}-3 a^{2} b d \,e^{2}+3 a \,b^{2} d^{2} e -b^{3} d^{3}}-\frac {b \left (A b -B a \right ) \ln \left (b x +a \right )}{a^{3} e^{3}-3 a^{2} b d \,e^{2}+3 a \,b^{2} d^{2} e -b^{3} d^{3}}\) \(219\)
risch \(\frac {\frac {e \left (A b -B a \right ) x}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}-\frac {A a \,e^{2}-3 A b d e +B a d e +b B \,d^{2}}{2 e \left (a^{2} e^{2}-2 a b d e +b^{2} d^{2}\right )}}{\left (e x +d \right )^{2}}-\frac {b^{2} \ln \left (b x +a \right ) A}{a^{3} e^{3}-3 a^{2} b d \,e^{2}+3 a \,b^{2} d^{2} e -b^{3} d^{3}}+\frac {b \ln \left (b x +a \right ) B a}{a^{3} e^{3}-3 a^{2} b d \,e^{2}+3 a \,b^{2} d^{2} e -b^{3} d^{3}}+\frac {b^{2} \ln \left (-e x -d \right ) A}{a^{3} e^{3}-3 a^{2} b d \,e^{2}+3 a \,b^{2} d^{2} e -b^{3} d^{3}}-\frac {b \ln \left (-e x -d \right ) B a}{a^{3} e^{3}-3 a^{2} b d \,e^{2}+3 a \,b^{2} d^{2} e -b^{3} d^{3}}\) \(299\)
parallelrisch \(-\frac {2 B \ln \left (e x +d \right ) x^{2} a b \,e^{4}+4 A \ln \left (b x +a \right ) x \,b^{2} d \,e^{3}-2 B x a b d \,e^{3}-4 A \ln \left (e x +d \right ) x \,b^{2} d \,e^{3}-2 B \ln \left (b x +a \right ) a b \,d^{2} e^{2}+2 B \ln \left (e x +d \right ) a b \,d^{2} e^{2}-2 B \ln \left (b x +a \right ) x^{2} a b \,e^{4}+B \,a^{2} d \,e^{3}+3 A \,b^{2} d^{2} e^{2}-b^{2} B \,d^{3} e +a^{2} A \,e^{4}-4 A a b d \,e^{3}-4 B \ln \left (b x +a \right ) x a b d \,e^{3}+4 B \ln \left (e x +d \right ) x a b d \,e^{3}+2 A \ln \left (b x +a \right ) x^{2} b^{2} e^{4}-2 A \ln \left (e x +d \right ) x^{2} b^{2} e^{4}+2 A \ln \left (b x +a \right ) b^{2} d^{2} e^{2}-2 A \ln \left (e x +d \right ) b^{2} d^{2} e^{2}-2 A x a b \,e^{4}+2 A x \,b^{2} d \,e^{3}+2 B x \,a^{2} e^{4}}{2 \left (a^{3} e^{3}-3 a^{2} b d \,e^{2}+3 a \,b^{2} d^{2} e -b^{3} d^{3}\right ) \left (e x +d \right )^{2} e^{2}}\) \(346\)

[In]

int((B*x+A)/(b*x+a)/(e*x+d)^3,x,method=_RETURNVERBOSE)

[Out]

-(A*b-B*a)*b/(a*e-b*d)^3*ln(b*x+a)-1/2*(A*e-B*d)/(a*e-b*d)/e/(e*x+d)^2+(A*b-B*a)*b/(a*e-b*d)^3*ln(e*x+d)+(A*b-
B*a)/(a*e-b*d)^2/(e*x+d)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 343 vs. \(2 (111) = 222\).

Time = 0.23 (sec) , antiderivative size = 343, normalized size of antiderivative = 3.06 \[ \int \frac {A+B x}{(a+b x) (d+e x)^3} \, dx=-\frac {B b^{2} d^{3} - 3 \, A b^{2} d^{2} e - A a^{2} e^{3} - {\left (B a^{2} - 4 \, A a b\right )} d e^{2} + 2 \, {\left ({\left (B a b - A b^{2}\right )} d e^{2} - {\left (B a^{2} - A a b\right )} e^{3}\right )} x + 2 \, {\left ({\left (B a b - A b^{2}\right )} e^{3} x^{2} + 2 \, {\left (B a b - A b^{2}\right )} d e^{2} x + {\left (B a b - A b^{2}\right )} d^{2} e\right )} \log \left (b x + a\right ) - 2 \, {\left ({\left (B a b - A b^{2}\right )} e^{3} x^{2} + 2 \, {\left (B a b - A b^{2}\right )} d e^{2} x + {\left (B a b - A b^{2}\right )} d^{2} e\right )} \log \left (e x + d\right )}{2 \, {\left (b^{3} d^{5} e - 3 \, a b^{2} d^{4} e^{2} + 3 \, a^{2} b d^{3} e^{3} - a^{3} d^{2} e^{4} + {\left (b^{3} d^{3} e^{3} - 3 \, a b^{2} d^{2} e^{4} + 3 \, a^{2} b d e^{5} - a^{3} e^{6}\right )} x^{2} + 2 \, {\left (b^{3} d^{4} e^{2} - 3 \, a b^{2} d^{3} e^{3} + 3 \, a^{2} b d^{2} e^{4} - a^{3} d e^{5}\right )} x\right )}} \]

[In]

integrate((B*x+A)/(b*x+a)/(e*x+d)^3,x, algorithm="fricas")

[Out]

-1/2*(B*b^2*d^3 - 3*A*b^2*d^2*e - A*a^2*e^3 - (B*a^2 - 4*A*a*b)*d*e^2 + 2*((B*a*b - A*b^2)*d*e^2 - (B*a^2 - A*
a*b)*e^3)*x + 2*((B*a*b - A*b^2)*e^3*x^2 + 2*(B*a*b - A*b^2)*d*e^2*x + (B*a*b - A*b^2)*d^2*e)*log(b*x + a) - 2
*((B*a*b - A*b^2)*e^3*x^2 + 2*(B*a*b - A*b^2)*d*e^2*x + (B*a*b - A*b^2)*d^2*e)*log(e*x + d))/(b^3*d^5*e - 3*a*
b^2*d^4*e^2 + 3*a^2*b*d^3*e^3 - a^3*d^2*e^4 + (b^3*d^3*e^3 - 3*a*b^2*d^2*e^4 + 3*a^2*b*d*e^5 - a^3*e^6)*x^2 +
2*(b^3*d^4*e^2 - 3*a*b^2*d^3*e^3 + 3*a^2*b*d^2*e^4 - a^3*d*e^5)*x)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 558 vs. \(2 (92) = 184\).

Time = 1.14 (sec) , antiderivative size = 558, normalized size of antiderivative = 4.98 \[ \int \frac {A+B x}{(a+b x) (d+e x)^3} \, dx=- \frac {b \left (- A b + B a\right ) \log {\left (x + \frac {- A a b^{2} e - A b^{3} d + B a^{2} b e + B a b^{2} d - \frac {a^{4} b e^{4} \left (- A b + B a\right )}{\left (a e - b d\right )^{3}} + \frac {4 a^{3} b^{2} d e^{3} \left (- A b + B a\right )}{\left (a e - b d\right )^{3}} - \frac {6 a^{2} b^{3} d^{2} e^{2} \left (- A b + B a\right )}{\left (a e - b d\right )^{3}} + \frac {4 a b^{4} d^{3} e \left (- A b + B a\right )}{\left (a e - b d\right )^{3}} - \frac {b^{5} d^{4} \left (- A b + B a\right )}{\left (a e - b d\right )^{3}}}{- 2 A b^{3} e + 2 B a b^{2} e} \right )}}{\left (a e - b d\right )^{3}} + \frac {b \left (- A b + B a\right ) \log {\left (x + \frac {- A a b^{2} e - A b^{3} d + B a^{2} b e + B a b^{2} d + \frac {a^{4} b e^{4} \left (- A b + B a\right )}{\left (a e - b d\right )^{3}} - \frac {4 a^{3} b^{2} d e^{3} \left (- A b + B a\right )}{\left (a e - b d\right )^{3}} + \frac {6 a^{2} b^{3} d^{2} e^{2} \left (- A b + B a\right )}{\left (a e - b d\right )^{3}} - \frac {4 a b^{4} d^{3} e \left (- A b + B a\right )}{\left (a e - b d\right )^{3}} + \frac {b^{5} d^{4} \left (- A b + B a\right )}{\left (a e - b d\right )^{3}}}{- 2 A b^{3} e + 2 B a b^{2} e} \right )}}{\left (a e - b d\right )^{3}} + \frac {- A a e^{2} + 3 A b d e - B a d e - B b d^{2} + x \left (2 A b e^{2} - 2 B a e^{2}\right )}{2 a^{2} d^{2} e^{3} - 4 a b d^{3} e^{2} + 2 b^{2} d^{4} e + x^{2} \cdot \left (2 a^{2} e^{5} - 4 a b d e^{4} + 2 b^{2} d^{2} e^{3}\right ) + x \left (4 a^{2} d e^{4} - 8 a b d^{2} e^{3} + 4 b^{2} d^{3} e^{2}\right )} \]

[In]

integrate((B*x+A)/(b*x+a)/(e*x+d)**3,x)

[Out]

-b*(-A*b + B*a)*log(x + (-A*a*b**2*e - A*b**3*d + B*a**2*b*e + B*a*b**2*d - a**4*b*e**4*(-A*b + B*a)/(a*e - b*
d)**3 + 4*a**3*b**2*d*e**3*(-A*b + B*a)/(a*e - b*d)**3 - 6*a**2*b**3*d**2*e**2*(-A*b + B*a)/(a*e - b*d)**3 + 4
*a*b**4*d**3*e*(-A*b + B*a)/(a*e - b*d)**3 - b**5*d**4*(-A*b + B*a)/(a*e - b*d)**3)/(-2*A*b**3*e + 2*B*a*b**2*
e))/(a*e - b*d)**3 + b*(-A*b + B*a)*log(x + (-A*a*b**2*e - A*b**3*d + B*a**2*b*e + B*a*b**2*d + a**4*b*e**4*(-
A*b + B*a)/(a*e - b*d)**3 - 4*a**3*b**2*d*e**3*(-A*b + B*a)/(a*e - b*d)**3 + 6*a**2*b**3*d**2*e**2*(-A*b + B*a
)/(a*e - b*d)**3 - 4*a*b**4*d**3*e*(-A*b + B*a)/(a*e - b*d)**3 + b**5*d**4*(-A*b + B*a)/(a*e - b*d)**3)/(-2*A*
b**3*e + 2*B*a*b**2*e))/(a*e - b*d)**3 + (-A*a*e**2 + 3*A*b*d*e - B*a*d*e - B*b*d**2 + x*(2*A*b*e**2 - 2*B*a*e
**2))/(2*a**2*d**2*e**3 - 4*a*b*d**3*e**2 + 2*b**2*d**4*e + x**2*(2*a**2*e**5 - 4*a*b*d*e**4 + 2*b**2*d**2*e**
3) + x*(4*a**2*d*e**4 - 8*a*b*d**2*e**3 + 4*b**2*d**3*e**2))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 247 vs. \(2 (111) = 222\).

Time = 0.19 (sec) , antiderivative size = 247, normalized size of antiderivative = 2.21 \[ \int \frac {A+B x}{(a+b x) (d+e x)^3} \, dx=-\frac {{\left (B a b - A b^{2}\right )} \log \left (b x + a\right )}{b^{3} d^{3} - 3 \, a b^{2} d^{2} e + 3 \, a^{2} b d e^{2} - a^{3} e^{3}} + \frac {{\left (B a b - A b^{2}\right )} \log \left (e x + d\right )}{b^{3} d^{3} - 3 \, a b^{2} d^{2} e + 3 \, a^{2} b d e^{2} - a^{3} e^{3}} - \frac {B b d^{2} + A a e^{2} + 2 \, {\left (B a - A b\right )} e^{2} x + {\left (B a - 3 \, A b\right )} d e}{2 \, {\left (b^{2} d^{4} e - 2 \, a b d^{3} e^{2} + a^{2} d^{2} e^{3} + {\left (b^{2} d^{2} e^{3} - 2 \, a b d e^{4} + a^{2} e^{5}\right )} x^{2} + 2 \, {\left (b^{2} d^{3} e^{2} - 2 \, a b d^{2} e^{3} + a^{2} d e^{4}\right )} x\right )}} \]

[In]

integrate((B*x+A)/(b*x+a)/(e*x+d)^3,x, algorithm="maxima")

[Out]

-(B*a*b - A*b^2)*log(b*x + a)/(b^3*d^3 - 3*a*b^2*d^2*e + 3*a^2*b*d*e^2 - a^3*e^3) + (B*a*b - A*b^2)*log(e*x +
d)/(b^3*d^3 - 3*a*b^2*d^2*e + 3*a^2*b*d*e^2 - a^3*e^3) - 1/2*(B*b*d^2 + A*a*e^2 + 2*(B*a - A*b)*e^2*x + (B*a -
 3*A*b)*d*e)/(b^2*d^4*e - 2*a*b*d^3*e^2 + a^2*d^2*e^3 + (b^2*d^2*e^3 - 2*a*b*d*e^4 + a^2*e^5)*x^2 + 2*(b^2*d^3
*e^2 - 2*a*b*d^2*e^3 + a^2*d*e^4)*x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 233 vs. \(2 (111) = 222\).

Time = 0.28 (sec) , antiderivative size = 233, normalized size of antiderivative = 2.08 \[ \int \frac {A+B x}{(a+b x) (d+e x)^3} \, dx=-\frac {{\left (B a b^{2} - A b^{3}\right )} \log \left ({\left | b x + a \right |}\right )}{b^{4} d^{3} - 3 \, a b^{3} d^{2} e + 3 \, a^{2} b^{2} d e^{2} - a^{3} b e^{3}} + \frac {{\left (B a b e - A b^{2} e\right )} \log \left ({\left | e x + d \right |}\right )}{b^{3} d^{3} e - 3 \, a b^{2} d^{2} e^{2} + 3 \, a^{2} b d e^{3} - a^{3} e^{4}} - \frac {B b^{2} d^{3} - 3 \, A b^{2} d^{2} e - B a^{2} d e^{2} + 4 \, A a b d e^{2} - A a^{2} e^{3} + 2 \, {\left (B a b d e^{2} - A b^{2} d e^{2} - B a^{2} e^{3} + A a b e^{3}\right )} x}{2 \, {\left (b d - a e\right )}^{3} {\left (e x + d\right )}^{2} e} \]

[In]

integrate((B*x+A)/(b*x+a)/(e*x+d)^3,x, algorithm="giac")

[Out]

-(B*a*b^2 - A*b^3)*log(abs(b*x + a))/(b^4*d^3 - 3*a*b^3*d^2*e + 3*a^2*b^2*d*e^2 - a^3*b*e^3) + (B*a*b*e - A*b^
2*e)*log(abs(e*x + d))/(b^3*d^3*e - 3*a*b^2*d^2*e^2 + 3*a^2*b*d*e^3 - a^3*e^4) - 1/2*(B*b^2*d^3 - 3*A*b^2*d^2*
e - B*a^2*d*e^2 + 4*A*a*b*d*e^2 - A*a^2*e^3 + 2*(B*a*b*d*e^2 - A*b^2*d*e^2 - B*a^2*e^3 + A*a*b*e^3)*x)/((b*d -
 a*e)^3*(e*x + d)^2*e)

Mupad [B] (verification not implemented)

Time = 1.45 (sec) , antiderivative size = 228, normalized size of antiderivative = 2.04 \[ \int \frac {A+B x}{(a+b x) (d+e x)^3} \, dx=-\frac {\frac {A\,a\,e^2+B\,b\,d^2-3\,A\,b\,d\,e+B\,a\,d\,e}{2\,e\,\left (a^2\,e^2-2\,a\,b\,d\,e+b^2\,d^2\right )}-\frac {e\,x\,\left (A\,b-B\,a\right )}{a^2\,e^2-2\,a\,b\,d\,e+b^2\,d^2}}{d^2+2\,d\,e\,x+e^2\,x^2}-\frac {2\,b\,\mathrm {atanh}\left (\frac {\left (\frac {a^3\,e^3-a^2\,b\,d\,e^2-a\,b^2\,d^2\,e+b^3\,d^3}{a^2\,e^2-2\,a\,b\,d\,e+b^2\,d^2}+2\,b\,e\,x\right )\,\left (a^2\,e^2-2\,a\,b\,d\,e+b^2\,d^2\right )}{{\left (a\,e-b\,d\right )}^3}\right )\,\left (A\,b-B\,a\right )}{{\left (a\,e-b\,d\right )}^3} \]

[In]

int((A + B*x)/((a + b*x)*(d + e*x)^3),x)

[Out]

- ((A*a*e^2 + B*b*d^2 - 3*A*b*d*e + B*a*d*e)/(2*e*(a^2*e^2 + b^2*d^2 - 2*a*b*d*e)) - (e*x*(A*b - B*a))/(a^2*e^
2 + b^2*d^2 - 2*a*b*d*e))/(d^2 + e^2*x^2 + 2*d*e*x) - (2*b*atanh((((a^3*e^3 + b^3*d^3 - a*b^2*d^2*e - a^2*b*d*
e^2)/(a^2*e^2 + b^2*d^2 - 2*a*b*d*e) + 2*b*e*x)*(a^2*e^2 + b^2*d^2 - 2*a*b*d*e))/(a*e - b*d)^3)*(A*b - B*a))/(
a*e - b*d)^3